<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>{{name}}下载  应用定制平台</title>
  <style media="screen">
    body{margin:0,position:relative}
    .shadow{display:none;background-color: rgba(80,85,86,0.6);position:absolute;top:0;left:0;bottom:0;right:0;}
    .tips{position: fixed;top: 10px;z-index: 103;padding-top: 14px;width: 100%;text-align: right;}
    .tips span,.tips img{vertical-align: middle;display: inline-block;margin-right: 10px;color: #fff;
    text-align: left;font-weight:700;font-size: 16px;line-height: 30px;}
    .shadow img {margin-bottom: 13px;width: 50px;}
    #dowload{margin:auto;padding: 12px 46px;width: 200px;border: 1px solid #A9B1B3;border-radius: 40px;color: #868C8E;font-size: 14px;}
    .appInfo{margin-top:120px;text-align:center;}
    .appInfo img{border-radius: 17.54%;max-width: 114px;max-height: 114px;}
    #appName {font-weight:700;padding:10px;}
  </style>
</head>
<body>
  <div class="appInfo">
    <img id="logo" src="{{logo}}" onerror='this.src="/sys/images/defaulticon.png"' />
    <div id="appName">{{name}}</div>
    <div id="dowload">{{buttontext}}</div>
  </div>
  <div class='shadow' id="shadow">
    <div class='tips'><span>点击右上角菜单<br/>在默认浏览器中打开并安装</span>
    <img src="/sys/images/shadow.png"></img><div>
  </div>
  <script type="text/javascript">
  function is_weixin(){
    var ua = navigator.userAgent.toLowerCase();
    if(ua.match(/MicroMessenger/i)=="micromessenger") {
    	 return true;
    	} else {
    	return false;
    }
  }
  (function(root){

    root.shadow.click(function(){root.shadow.style.display= 'none';});
    root.dowload.onclick = function(){
      if (is_weixin()){
        root.shadow.style.display= 'block';
      }
      else {
        location.href="{{url}}";
        alert("{{msginfo}}")
      }
    }
  })(window);
  </script>
</body>
</html>
